﻿using Company.Main.Views;
using Company.Share.Prism;
using Prism.Dialogs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace Company.Shell.ViewModels
{
    public class MainWindowViewModel : BindableBase
    {
        public ICommand LoadedCommand { get; }
        //public IModuleManager ModuleManager { get; }
        public IRegionManager RegionManager { get; }
        public MainWindowViewModel(IRegionManager regionManager)
        {
            //ModuleManager = moduleManager;
            RegionManager = regionManager;
            LoadedCommand = new DelegateCommand(Loaded);
        }

        private void Loaded()
        {
            //第一步，加载模块
            //ModuleManager.LoadModule(ModuleNames.CompanyMainModule);
            //第二步，导航区域
            RegionManager.RequestNavigate(RegionNames.MainRegion, ViewNames.MainView);
        }
    }
}
